import http from '@/utils/httpRequest'

/** 入库or出库 人字典查询 */
export function queryUser () {
  return http({
    url: '/api/uration/user/list',
    method: 'get'
  })
}

/** 新增农资目录 */
export function querynzAdd (data) {
  return http({
    url: '/api/material/stock/goods',
    method: 'post',
    data
  })
}

/** 农资目录删除 */
export function deletnzList (query) {
  return http({
    url: '/api/material/stock/goods/' + query,
    method: 'delete'
  })
}

/** 农资库存查询列表 */
export function querynzList (params) {
  return http({
    url: '/api/material/stock/goods/kc/list',
    method: 'get',
    params
  })
}
/** 农资目录查询列表 */
export function querynzmlList (params) {
  return http({
    url: '/api/material/stock/goods/list',
    method: 'get',
    params
  })
}

/** 农资入库发送 */
export function querynzSend (data) {
  return http({
    url: '/api/material/stock/goods/in',
    method: 'post',
    data
  })
}

/** 农资出库**/
export function querynzOut (data) {
  return http({
    url: '/api/material/stock/goods/out',
    method: 'post',
    data
  })
}

/** 农资库存查看按钮 */
export function querynzCheck (params) {
  return http({
    url: '/api/material/stock/goods/kc/' + params,
    method: 'get'
  })
}

/** 农资库存查看表格 */
export function querynzChecklist (kcId) {
  return http({
    url: '/api/material/stock/goods/kc/batchlist?kcId=' + kcId,
    method: 'get'
  })
}

/** 农资目录修改 */
export function querynzmodify (data) {
  return http({
    url: '/api/material/stock/goods',
    method: 'put',
    data
  })
}

/**
获取农资目录详细信息 */
export function querynzmlDetail (id) {
  return http({
    url: '/api/material/stock/goods/' + id,
    method: 'get'
  })
}

/** 获取入库批次号 */
export function querynzWarehousing () {
  return http({
    url: '/api/material/stock/goods/in/batchcode',
    method: 'get'
  })
}

/** 获取出库批次号 */
export function querynzOutnum () {
  return http({
    url: '/api/material/stock/goods/out/batchcode',
    method: 'get'
  })
}

/** 农具库存查询列表 */
export function querynjList (params) {
  return http({
    url: '/api/material/stock/machinery/kc/list',
    method: 'get',
    params
  })
}

/** 农具目录查询列表 */
export function querynjmlList (params) {
  return http({
    url: '/api/material/stock/machinery/list',
    method: 'get',
    params
  })
}

/** 农具查看按钮 */
export function querynjCheck (params) {
  return http({
    url: '/api/material/stock/machinery/kc/' + params,
    method: 'get'
  })
}

/** 农具库存查看表格 */
export function querynjChecklist (kcId) {
  return http({
    url: '/api/material/stock/machinery/kc/batchlist?kcId=' + kcId,
    method: 'get'
  })
}

/** 农具目录修改 */
export function querynjmodify (data) {
  return http({
    url: '/api/material/stock/machinery',
    method: 'put',
    data
  })
}

/** 农具目录删除 */
export function deletnjList (query) {
  return http({
    url: '/api/material/stock/machinery/' + query,
    method: 'delete'
  })
}

/** 新增农具目录 */
export function querynjAdd (data) {
  return http({
    url: '/api/material/stock/machinery',
    method: 'post',
    data
  })
}

/** 农具入库发送 */
export function querynjSend (data) {
  return http({
    url: '/api/material/stock/machinery/in',
    method: 'post',
    data
  })
}

/** 农具入库批次号 */
export function querynjWarehousing () {
  return http({
    url: '/api/material/stock/machinery/in/batchcode',
    method: 'get'
  })
}

/** 农具出库**/
export function querynjOut (data) {
  return http({
    url: '/api/material/stock/machinery/out',
    method: 'post',
    data
  })
}
